package newfeatures.lambda;

/**
 * 自定义函数接口主程序
 */
public class OperatorMain {
    public static void main(String[] args) {
        System.out.println(operator(1, 2, (x, y) -> x - y));
    }

    public static Integer operator(Integer x, Integer y, OperatorFunction<Integer, Integer> function) {
        return function.operator(x, y);
    }
}
